//该文件专门用于创建整个应用的路由器
import VueRouter from "vue-router";
//应用组件
import home from "@/pages/home.vue";
import login from "@/pages/login.vue";
import H_message from "@/pages/H_message.vue"
import H_News from "@/pages/H_News.vue"
import H_M_Detail from "@/pages/H_M_Detail.vue"
//创建一个路由器 并暴露
//创建router实例对象，去管理一组一组的路由规则
export default new VueRouter({
    routes: [
        {
            path: "/home",
            component: home,
            children: [//通过children配置子级路由
                {
                    path: "H_message",//此处一定定不要写: /H_message
                    component: H_message,
                    children:[
                        {
                            path: "H_M_Detail",
                            component: H_M_Detail
                        }
                    ]
                },
                {
                    path: "H_News",
                    component: H_News
                }
            ]
        },
        {
            path: "/login",
            component: login
        },
    ]
})
